package com.loong.common.domain;

import com.google.common.collect.Lists;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Tolerate;

import java.util.List;

@Builder
@Setter
@Getter
public class Pager<T> extends BaseDomain {
    private static final long serialVersionUID = 1038184723205915125L;

    @Tolerate
    public Pager(){}
    @Tolerate
    public Pager(List list){
        this.dataList=list;
    }

    /**
     * 游标
     */
    private int offset;
    /**
     * 页码
     */
    private int pageIndex;
    /**
     * 分页大小
     */
    private int pageSize;
    /**
     * 总数
     */
    private long total;
    /**
     * 总页数
     */
    private long totalPage;
    /**
     * 结果
     */
    protected List<T> dataList;

}
